package me.yuxiaoyao.lock.annotation;

import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanNameGenerator;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.core.type.AnnotationMetadata;

import java.util.Map;

/**
 * @author kerryzhang on 2020/12/21
 */


public class DistributedLockRegistrar implements ImportBeanDefinitionRegistrar {

    public DistributedLockRegistrar() {
        System.out.println("DistributedLockRegistrar.DistributedLockRegistrar");
    }

    @Override
    public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry, BeanNameGenerator importBeanNameGenerator) {
        Map<String, Object> attributes = importingClassMetadata.getAnnotationAttributes(EnableDistributedLock.class.getName());
    }
}
